home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir31 / randmod.zip / RANDMOD.DOC < prev    next >
Text File  |  1994-06-16  |  9KB  |  186 lines

  1.                      R ■ A ■ N ■ D ■ M ■ O ■ D
  2.  
  3.                             version 2.1
  4.  
  5.                   The random music file selector.
  6.  
  7.                    (C)opyright 1994 Jesse Morris
  8.  
  9.      RandMod is a utility that will randomly select a music file (such 
  10. as a .mod file) and load up another program to play it.  The advantage 
  11. of this, as opposed to having RandMod play the file itself, is twofold.  
  12. First of all, RandMod stays small, and compact.  Secondly, it is 
  13. entirely detatched from the hardware, so it will work with any sound 
  14. card or music system you like.  There are some excellent .mod players 
  15. out there, and this will let you use them in just one other way.  It is 
  16. a fairly complex piece of software, capable of some rather sophisticated 
  17. things.  Here's how it works.  
  18.  
  19.  
  20.                    Creating a Configuration File      
  21.  
  22.      In order for RandMod to function properly, you must let it know 
  23. which music players you have present.  You do this by creating or editing
  24. a file called RandMod.Cfg.  This file should contain, on seperate lines, 
  25. a list of all of the music players that you have present.  It should 
  26. contain the full filename.
  27.  
  28.      You may also, after each line, list what command line arguments 
  29. that particular player needs.  However, you MUST begin these lines with 
  30. the left square bracket character. ("[")  If you like, you may end this 
  31. line with a right square bracket ("]") but it is not necessary.
  32.  
  33.      For instance, a configuration file might read as follows:
  34.  
  35. WOWII.EXE
  36. [ /H:44100 /DMA:1 ]
  37. PLAY.EXE
  38. DMP.EXE
  39. [ -n32 ]
  40. GUSMOD.EXE
  41. metal.exe
  42. [-ss -v96]
  43. \s3m\ENJOYs3m.EXE
  44.  
  45.  
  46.         And so on.  The only limit to how many music players you can 
  47. have in RandMod.Cfg is how many you can fit on your disk.  All of the 
  48. players specified must be able to be driven from the command line, 
  49. obviously.
  50.      
  51.  
  52.                          Choosing a Music Player
  53.  
  54.         You can, at runtime, tell RandMod to chose a specific music 
  55. player from the list specified in RandMod.Cfg.  (If you do not, it will 
  56. default to the first one.)  You can do this with the -p<x> parameter, 
  57. where x is the number of the player to use.  So, if you typed
  58. C:\SOUND\MUSIC\UTILS> RandMod /p2
  59. RandMod would chose the second music player listed in RandMod.cfg file.
  60.  
  61.  
  62.                          Choosing What to Play
  63.  
  64.         You can also tell RandMod what files to chose from in it's 
  65. selection.  You do this by simply entering, as a parameter, the file
  66. mask (such as *.*) you wish RandMod to chose from.  You may use multiple 
  67. masks if you wish.  If you do not specify one, RandMod will chose from 
  68. all of the files in the current directory with a .mod extention.
  69. Some examples of possible file masks:
  70. C:\SOUND\MUSIC\UTILS> RandMod.Exe ..\mod\*.mod ..\s3m\*.s3m d:b*.stm
  71. This will chose one of the files that satisfy any of those qualifications.
  72.  
  73.         If this does not allow you enough flexability, you may also opt to 
  74. create a list file.  This is a file containing a list of pieces to chose 
  75. from.  It is in ascii format, with each line consisting of a filename, and 
  76. (optionally) a couple of spaces and a weighting.  With this you can make
  77. playback of certain files more probable than others.  It's all relative, so 
  78. a file with a weighting of two plays back twice as often as one of one, 
  79. while a file with a weighting of three is chosen as often as the other two 
  80. combined.  A sample list file is as follows:
  81.  
  82. 2ND_PM.S3M      4
  83. 2ND_SKAV.S3M    7
  84. AQUA.S3M        
  85. CCITY12.S3M     3
  86. CHAOS.S3M       9
  87. EXPLORAT.S3M    6
  88. GMOTION.S3M     
  89. SATELL.S3M      4
  90. SPRING.S3M      5
  91. STRSHINE.S3M    8
  92. SYMPHONY.S3M    6
  93. TURBULEN.S3M    5
  94.  
  95.         Bear in mind that any file that fits into more than one of the file 
  96. masks, or is in some referenced more than once will be played more often 
  97. than one than is only mentioned once.  So if you select b*.* as well as 
  98. *.mod, every file that fits into b*.mod will pop up twice as often as any 
  99. other.  
  100.  
  101.  
  102.                         Displaying The Song Name
  103.  
  104.         When RandMod selects a file to play, it will attempt to extract the 
  105. song name from it.  This will only work for music file formats in which the 
  106. title is in the first couple of bytes.  (for instance, .mod, .s3m, and some
  107. other similar formats)  If the module name consists of other, non-printable 
  108. characters, it will not be displayed.
  109.  
  110.         RandMod has the option of delaying a period of time before actually 
  111. loading up the music player.  This is to give you time to read the title, 
  112. and decide if you really want to play it.  If you do, you can wait, or 
  113. press almost any key, and it will proceed to play the file.  However, if 
  114. you would like to abort the playback (perhaps this given file crashes that 
  115. specific player, or you just don't feel like listening to it) you may do so 
  116. by pressing the ESC key.  If you press 'Q' it will also abort the playback 
  117. and generate an error code of 32767, which may be useful to write interactive 
  118. batch files.  The period of time to wait (in clock ticks, or approximately 
  119. 1/18.2 of a second) may be specified with the /w paramater.
  120.  
  121.         In fact, a batch file is included in the RandMod zip file.  It is 
  122. called simply Repeater.Bat.  When run, it will randomly select a file with 
  123. RandMod, using the default player.  It will then, when finished with that 
  124. music file, (unless you abort RandMod with the 'Q' key) repeat the whole 
  125. process.  (If RandMod is aborted with the 'Q' key, the batch file will exit)
  126. One use of this is (if you have a multitasking OS friendly DOS music 
  127. player) to have it running in a DOS task, in the background. 
  128.  
  129.         You can use Repeater.Bat just as you would use RandMod.  It passes 
  130. any command line switches on to RandMod, and specifies none itself.
  131.  
  132.         By the way:  If you are at all into Modfiles, and don't already 
  133. have one, get a Gravis UltraSound.  It delivers incredible sound quality, 
  134. and is easy to program for.
  135.  
  136.         Also:  This program is indeed ShareWare.  If you like it or use it 
  137. or both, please send me a modest $5.  I'll then be encouraged to write more 
  138. useful software.  If you don't like it, you can send me money and a list of 
  139. programs you would find usefull.  (or send me just the list, and the money 
  140. when I'm done writing it.)  Of course, registered users will also recieve
  141. updates to RandMod, and most likely a discount from the registration of my
  142. next release, whatever that may be.
  143.  
  144.         In case you're interested, here are all the ideas for programming 
  145. projects I have been writing and/or considering writing:
  146.  
  147. RandMod (of course!)    A Text Adventure (involving time travel)
  148. ModMaster, a GUI shell          Misc. Fun Graphics Stuff      UltraTetris!
  149. A nifty, colourful spectrum analyzer to run on your sound card's line-in.
  150.       VGA CoreWars (version 1.2 -- 1.1's already out!  Look for it!)
  151.  
  152. In the distant future, I am thinking of writing a screen saver that looks 
  153. as good as some of the major demos out today do.  
  154.  
  155.         If any of these ideas appeal to you, let me know.  If I hear any 
  156. interest in any of them, I will be MUCH more likely to work on them.
  157.  
  158.         If you want to register, if you want to suggest an interesting new 
  159. programming project, or 'vote for' one of the ones I've listed, or have a 
  160. question, or even (god forbid!) a BUG REPORT, please contact me.  I can be
  161. reached at the following addresses:
  162.  
  163.       InterNet!!!  
  164.     jmorris@ace.com  (mail only. :-(  if you know where I can get a free
  165.                                           full account, let me know!!!)
  166.       WWIV Net, ICENET, WEBNET:
  167.     229@6754 
  168.                                If you're not into telecommunications,
  169.       ExpressNet               you can reach me at the following
  170.     229@1                      address:
  171.                                                 Jesse Morris
  172.                                                 Rangeley Software
  173.                                                 42 Rangeley Rd
  174.                                                 Winchester, MA, 01890, USA
  175.  
  176. Even if you have no intention of registering whatsoever, if you do use this 
  177. software for long enough to have bothered reading through the documentation, 
  178. you MUST send me something saying that you use and/or like it.  Any 
  179. suggestions, hints, criticisms, or anything else are all welcome.  This is 
  180. only my second piece of software released, and I am very curious to see how 
  181. many people use it.
  182.                                             
  183.         OH!  In case you were wondering, I wrote this with Turbo C++ 
  184. version 3.1.  Any bugs you encounter are Borland's fault, and not mine, of 
  185. course.  :)  (If you want to fund me in purchasing BC++ 4.0, feel free!)
  186.